#include "Thread.h"
#include "ThreadManager.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

using namespace qy;

class Hello : public Thread
{
public:
    Hello(int i) : mId(i){}
    int run()
	{
	    printf("Hello %d \n", mId);
	}

private:
	int mId;
};

int main()
{
    ThreadManager *manager = new ThreadManager(2);
    for(int i = 0; i < 5; i++)
	{
	    Hello *h = new Hello(i);
		manager->addThread(h);
	}
	manager->start();
	sleep(1);
	pause();
	return 0;
}


